<?php

/**
 *  筛选器
*/

namespace app\api\controller;
use app\facade\Basic;
use think\Request;
use app\api\service\ProductFilter as ServiceProductFilter;

class ProductFilter extends BaseController
{
    /**
     *  筛选器分组
     */
    public function group(Request $request)
    {
        $param['user_id'] = $request->user_id;
        $param['lang'] = $request->header('think-lang');

        /* 登录操作 */
        $ServiceLogin = new ServiceProductFilter();
        $result = $ServiceLogin->group($param);
        return Basic::json($result);
    }


    /**
     *  框架品牌
     */
    public function brand(Request $request)
    {
        $param['user_id'] = $request->user_id;

        /* 登录操作 */
        $ServiceLogin = new ServiceProductFilter();
        $result = $ServiceLogin->brand($param);
        return Basic::json($result);
    }

    /**
     *  货币和算法
     */
    public function coin(Request $request)
    {
        $param['user_id'] = $request->user_id;

        /* 登录操作 */
        $ServiceLogin = new ServiceProductFilter();
        $result = $ServiceLogin->coin($param);
        return Basic::json($result);
    }

    /**
     *  仓库
     */
    public function warehouse(Request $request)
    {
        $param['user_id'] = $request->user_id;

        /* 登录操作 */
        $ServiceLogin = new ServiceProductFilter();
        $result = $ServiceLogin->warehouse($param);
        return Basic::json($result);
    }

}